home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / mus / play / tracker_4_31.lzh / tracker / Makefile < prev    next >
Makefile  |  1995-05-19  |  8KB  |  273 lines

  1. # Makefile for any machine
  2. # - based on my newer makefile and the GREATE
  3. # modifications by Mike Battersby
  4. ###############################################################################
  5. #
  6. # CONFIGURATION OPTIONS
  7. #
  8.  
  9. # Choose your machine type. Possible types as of this version (4.11)
  10. # are
  11. #  hpalib, hplow, hp3, dec, solaris, sparc, linux, freebsd, sgi, 
  12. #  soundblaster, aix, next.
  13. # gmake needed to handle this file in FreeBSD
  14. MACHINE = sparc
  15. VERSION = 4.31
  16.  
  17. # The name of your C compiler. For most machines this will be
  18. # either 'cc' or 'gcc'.
  19. CC = gcc
  20.  
  21. OPTS=-c
  22.  
  23. # User interface type. Right now, this is Unix as there are no alternatives.
  24. UI = Unix/./
  25.  
  26. PREFIX=/users/algo/espie/pub
  27. # Destination directory for tracker binaries and manpage.
  28. #
  29. # If you don't wish to use the 'make install' and 'make install.man'
  30. # commands, you can ignore these.
  31. BIN_DIR = $(PREFIX)/bin
  32. MAN_DIR = $(PREFIX)/man
  33.  
  34. # Where to put the compression methods description
  35. COMPRESSION_FILE=$(PREFIX)/lib/compression_methods
  36.  
  37. # How to install the binaries and manpage. If you have a unix system,
  38. # use the GNU install program if you have it, otherwise try 'cp'. For
  39. # non-unix systems, make this the command for copying a file with the
  40. # following syntax
  41. #  <program_name> <source_name> <destination_name>
  42. #
  43. # If you don't wish to use the 'make install' and 'make install.man'
  44. # commands, you can ignore this.
  45. INSTALL = ginstall
  46.  
  47. # Permissions and user/group id's to install with. Non-unix users
  48. # should comment these out (alternatively, you can use these to
  49. # provide arguments for the above $(INSTALL) program). If you want
  50. # to install tracker setuid root (which will allow it to renice
  51. # itself when non-root users run it), change the "-m 755" below to
  52. # "-m 4755". If you do so, you must be root to run make install.
  53. #
  54. # If you don't wish to use the 'make install' and 'make install.man'
  55. # commands, you can ignore these.
  56. INST_BIN_OPT = -c -s -m 555 -o store -g store
  57. INST_MAN_OPT = -c -m 444 -o store -g store
  58. ###############################################################################
  59. #
  60. # C compiler flags and libraries for each machine.
  61. # Unless you are porting this to a new architecture, you shouldn't
  62. # need to change these (on the other hand, if you understand what you
  63. # are doing, go ahead!).
  64. #
  65.  
  66. CFLAGS_next = -O3 -fomit-frame-pointer -funroll-loops -ffast-math -Wall
  67. LIBS_next   =
  68. AUDIODIR_next = NeXT/
  69. CONFIG_next = NeXT/
  70.  
  71. CFLAGS_hpalib = -Ae +O3 +ESlit -DVOLUME_CONTROL
  72. LIBS_hpalib   = -lAt -lAlib -lm
  73. AUDIODIR_hpalib=Hpux/
  74. AUDIONAME_hpalib=alib_
  75. CONFIG_hpalib = Hpux/
  76.  
  77. CFLAGS_hplow = -Ae +O3 -Wl,-a,archive -s
  78. LIBS_hplow=-lM
  79. AUDIODIR_hplow=Hpux/
  80. AUDIONAME_hplow=low_
  81. CONFIG_hplow = Hpux/
  82.  
  83. # yet another port to hp! This one might be the best yet.
  84. CFLAGS_hp3 = -Aa -D_HPUX_SOURCE +e +O3 +ESlit -DVOLUME_CONTROL
  85. LIBS_hp3   = -lAt -lAlib -lm
  86. AUDIODIR_hp3=Hpux/
  87. AUDIONAME_hp3=3_
  88. CONFIG_hp3 = Hpux/
  89.  
  90. CFLAGS_solaris = -O
  91. LIBS_solaris   = -lm
  92. AUDIODIR_solaris=Sparc/ 
  93. CONFIG_solaris = Sparc/solaris_
  94.  
  95.  
  96. #CFLAGS_sparc = -g
  97. #CFLAGS_sparc = -O4 -Bstatic
  98. #CFLAGS_sparc = -g -D__USE_FIXED_PROTOTYPES__
  99. CFLAGS_sparc = -O2 -finline-functions -funroll-loops -Wall \
  100. -D__USE_FIXED_PROTOTYPES__ -static
  101. LIBS_sparc   = -lm
  102. AUDIODIR_sparc=Sparc/
  103. CONFIG_sparc = Sparc/
  104.  
  105. CFLAGS_dec = -O 
  106. LIBS_dec   = -lm -lAF
  107. AUDIODIR_dec=AF/
  108. CONFIG_dec = AF/dec_
  109.  
  110. CFLAGS_sgi = -O2
  111. LIBS_sgi   = -laudio -lm
  112. AUDIODIR_sgi=Sgi/
  113. CONFIG_sgi = Sgi/
  114.  
  115. CFLAGS_soundblaster = -O
  116. LIBS_soundblaster   = -lm
  117. AUDIODIR_soundblaster=Soundblaster/
  118. CONFIG_soundblaster = Soundblaster/
  119.  
  120. CFLAGS_linux = -N -O2 -funroll-loops
  121. LIBS_linux   = -lm
  122. AUDIODIR_linux=PCux/
  123. CONFIG_linux = PCux/linux_
  124.  
  125. CFLAGS_freebsd = -O2 -funroll-loops -finline-functions
  126. LIBS_freebsd = -lm
  127. AUDIODIR_freebsd=PCux/
  128. CONFIG_freebsd = PCux/freebsd_
  129.  
  130. CFLAGS_aix = -O
  131. LIBS_aix = -lm
  132. AUDIODIR_aix = Aix/
  133. CONFIG_aix = Aix/
  134.  
  135. CFLAGS_NAS = -O -I/usr/X11R6
  136. LIBS_NAS = -lm -L/usr/X11R6/lib -laudio -lX11
  137. AUDIODIR_NAS = NAS/
  138. CONFIG_NAS = NAS/
  139.  
  140. CFLAGS_SVR4 = -O -I/usr/X/include
  141. LIBS_SVR4 = -L/usr/X/lib $(LIBS_NAS) -lsocket -lnsl -lc /usr/ucblib/libucb.a
  142. AUDIODIR_SVR4 = $(AUDIODIR_NAS)
  143. CONFIG_SVR4 = $(CONFIG_NAS)
  144.  
  145. CFLAGS = $(CFLAGS_${MACHINE})
  146. COPTS = $(OPTS) $(CFLAGS)
  147. LIBS = $(LIBS_${MACHINE})
  148. CONFIG = Arch/$(CONFIG_${MACHINE})
  149. AUDIODIR = Arch/$(AUDIODIR_${MACHINE})
  150. AUDIONAME = $(AUDIONAME_${MACHINE})
  151. AUDIO = $(AUDIODIR)$(AUDIONAME)
  152.  
  153. OBJ_TRACKER = main.o $(AUDIO)audio.o st_read.o commands.o \
  154. resample.o automaton.o st_play.o getopt.o open.o tools.o \
  155. dump_song.o setup_audio.o notes.o display.o empty.o \
  156. $(UI)ui.o prefs.o tags.o autoinit.o color.o version.o
  157.  
  158. OBJ_ANALYZER = analyzer.o st_read.o open.o dump_song.o tools.o notes.o \
  159. prefs.o autoinit.o ${UI}ui.o display.o empty.o color.o version.o
  160.  
  161. OBJ_SPLITMOD = split.o tools.o st_read.o dump_song.o open.o notes.o \
  162. display.o prefs.o autoinit.o $(UI)ui.o empty.o color.o version.o
  163.  
  164. all:    version.c config.h tracker randomize tcheck splitmod
  165.  
  166. config.h: $(CONFIG)config.h Makefile
  167.     rm -f config.h
  168.     cp $(CONFIG)config.h config.h
  169.  
  170. version.c: Makefile
  171.     echo >version.c char \*VERSION=\"${VERSION}\"\;
  172.  
  173. install: 
  174.     $(INSTALL) $(INST_BIN_OPT) tracker $(BIN_DIR)
  175.     $(INSTALL) $(INST_BIN_OPT) randomize $(BIN_DIR)
  176.     $(INSTALL) $(INST_BIN_OPT) tcheck $(BIN_DIR)
  177.     $(INSTALL) $(INST_BIN_OPT) splitmod $(BIN_DIR)
  178.     [ -f ${COMPRESSION_FILE} ] || \
  179.         $(INSTALL) $(INST_MAN_OPT) compression_methods ${COMPRESSION_FILE}
  180.  
  181. install.man:
  182.     $(INSTALL) $(INST_MAN_OPT) man/tracker.1 $(MAN_DIR)/man1/tracker.1
  183.  
  184.  
  185.  
  186. devel: 
  187.     -rm -f $(BIN_DIR)/dtracker #$(BIN_DIR)/splitmod
  188.     cp tracker $(BIN_DIR)/dtracker
  189. #-    cp splitmod $(BIN_DIR)/splitmod
  190.  
  191. tracker: ${OBJ_TRACKER}
  192.     ${CC} -o tracker ${CFLAGS} ${OBJ_TRACKER} ${LIBS}
  193.  
  194. dtracker: ${OBJ_TRACKER}
  195.     ${CC} -o dtracker ${CFLAGS} ${OBJ_TRACKER} ${LIBS}
  196.  
  197. tcheck: ${OBJ_ANALYZER}
  198.     $(CC) -o tcheck ${CFLAGS} ${OBJ_ANALYZER} ${LIBS}
  199.  
  200. randomize: randomize.c
  201.     $(CC) -o randomize ${CFLAGS} randomize.c 
  202.  
  203. splitmod: ${OBJ_SPLITMOD}
  204.     $(CC) -o splitmod ${CFLAGS} ${OBJ_SPLITMOD} ${LIBS}
  205.  
  206. main.o: main.c song.h 
  207.     $(CC) ${COPTS} main.c
  208.  
  209. tools.o: main.c 
  210.     $(CC) ${COPTS} tools.c
  211.  
  212. $(AUDIO)audio.o: $(AUDIO)audio.c Arch/common.c
  213.     cd $(AUDIODIR); $(CC) -I../.. ${COPTS} $(AUDIONAME)audio.c
  214.  
  215. $(UI)ui.o: $(UI)ui.c
  216.     cd $(UI); $(CC) -I.. ${COPTS} ui.c
  217.  
  218. split.o: split.c
  219.     $(CC) ${COPTS} split.c
  220.  
  221. open.o: open.c Makefile
  222.     $(CC) ${COPTS} -DCOMPRESSION_FILE=\"${COMPRESSION_FILE}\" open.c
  223.  
  224. resample.o: resample.c
  225.     $(CC) ${COPTS} resample.c
  226.  
  227. automaton.o: automaton.c song.h channel.h
  228.     $(CC) ${COPTS} automaton.c
  229.  
  230. getopt.o: getopt.c getoption.h
  231.     $(CC) ${COPTS} getopt.c
  232.  
  233. player.o: player.c song.h channel.h
  234.     $(CC) ${COPTS} player.c
  235.  
  236. st_read.o: st_read.c song.h
  237.     $(CC) ${COPTS} st_read.c
  238.  
  239. commands.o: commands.c channel.h song.h
  240.     $(CC) ${COPTS} commands.c
  241.  
  242. dump_song.o: dump_song.c
  243.     $(CC) $(COPTS) dump_song.c
  244. analyzer.o: analyzer.c
  245.     $(CC) $(COPTS) analyzer.c
  246. setup_audio.o: setup_audio.c
  247.     $(CC) $(COPTS) setup_audio.c
  248. notes.o: notes.c
  249.     $(CC) $(COPTS) notes.c
  250.  
  251. display.o: display.c
  252.     $(CC) $(COPTS) display.c
  253.  
  254.  
  255. clean:
  256.     -rm -f $(OBJ_TRACKER) $(OBJ_ANALYZER) $(OBJ_SPLITMOD) randomize.o
  257.     -rm -f tracker randomize splitmod tcheck core 
  258.     -rm -f tracker*.tar tracker\*.tar.Z tracker\*.lzh
  259.     -rm -f config.h version.c
  260.     find . -name \*.bak -exec rm {} \;
  261.  
  262. export:
  263.     -rm tracker*.tar.Z tracker*.lzh tracker*.lha
  264.     cd ..; tar -cvof tracker/tracker-$(VERSION).tar -T tracker/arc.list
  265.     mv tracker-$(VERSION).tar /tmp
  266.     cd /tmp; tar xvf tracker-$(VERSION).tar
  267.     cd /tmp; lha a tracker-$(VERSION).lzh tracker
  268.     compress /tmp/tracker-$(VERSION).tar
  269.     cp /tmp/tracker-$(VERSION).lzh .
  270.     cp /tmp/tracker-$(VERSION).tar.Z .
  271.     rm -rf /tmp/tracker*;
  272.  
  273.